package com.twu.biblioteca.dao;

import com.twu.biblioteca.model.User;

import java.util.ArrayList;
import java.util.List;

public class UserDao {
    private List<User> users = new ArrayList<>();

    public void prepareData() {
        users.add(new User("123-4567", "passwd7"));
        users.add(new User("123-4568", "passwd8"));
        users.add(new User("123-4569", "passwd9"));
    }

    public boolean verify(String username, String password) {
        if (this.users.contains(new User(username, password))) {
            return true;
        } else {
            return false;
        }
    }
}
